Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix hot-reloading in Demo API #3039

Merged
merged 2 commits into from
Jan 28, 2025
Merged

Fix hot-reloading in Demo API #3039

merged 2 commits into from
Jan 28, 2025

Conversation

johnnyomair
Copy link
Collaborator

Description

The solution introduced in #1837 didn't work as expected. While researching I've found that the watchAssets option can't be used for hot-reloading since it doesn't restart the dev server: nestjs/nest-cli#1136.

To fix this, we now watch the packages using chokidar-cli and trigger a reload by creating a fake change in src/reload.ts.

Acceptance criteria

Screenshots/screencasts

demo.working.hot.reloading.mov

@johnnyomair johnnyomair self-assigned this Jan 7, 2025
Copy link

sonarqubecloud bot commented Jan 7, 2025

manuelblum
manuelblum previously approved these changes Jan 27, 2025
Copy link
Collaborator

@manuelblum manuelblum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a little bit hacky, but even better then no hot reloading :-D

@johnnyomair johnnyomair merged commit e65a401 into main Jan 28, 2025
11 checks passed
@johnnyomair johnnyomair deleted the demo-api-fix-hot-reload branch January 28, 2025 11:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants